package mest.service.Modeling.Impl;

import mest.dao.Modeling.IworkFileDao;
import mest.entity.work_file;
import mest.service.Modeling.IworkFileService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description
 * @auther Machenike
 * @create 2019-11-16 3:31
 */
@Service
public class IworkFileServiceImpl implements IworkFileService {

    @Resource
    private IworkFileDao iwfd;

    @Override
    public int insertWorkFileType(work_file ct,String theirDb) {
        try {
            return iwfd.insertWorkFileType(ct, theirDb);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return 0;
    }

    @Override
    public int selectCount(String theirDb) {
        return iwfd.selectCount( theirDb);
    }

    @Override
    public List<work_file> findWorkFilePage(int index, int pageSize,String theirDb) {
        return iwfd.findWorkFilePage((index-1)*pageSize,pageSize, theirDb);
    }
}
